home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / jam / jamdisk7 / inc9110b.lzh / include / time.h < prev    next >
C/C++ Source or Header  |  1991-03-23  |  2KB  |  65 lines

  1. /*
  2.  * Libraries and headers for PDC release 3.3 (C) 1989 Lionel Hummel.
  3.  * PDC Software Distribution (C) 1989 Lionel Hummel and Paul Petersen.
  4.  *
  5.  * This code is freely redistributable upon the conditions that this 
  6.  * notice remains intact and that modified versions of this file not
  7.  * be included as part of the PDC Software Distribution without the
  8.  * express consent of the copyright holders.  No warrantee of any
  9.  * kind is provided with this code.  For further information, contact:
  10.  *
  11.  *  PDC Software Distribution    Internet:                     BIX:
  12.  *  P.O. Box 4006             or hummel@cs.uiuc.edu            lhummel
  13.  *  Urbana, IL  61801-8801       petersen@uicsrd.csrd.uiuc.edu
  14.  */
  15.  
  16. /* time.h - standard C time functions and definitions */
  17.  
  18. /*
  19.  *  3.3.91 sjw; K&R2
  20.  * 23.3.91 sjw; make jday() int, not double
  21.  */
  22.  
  23. #ifndef __TIME_H__
  24. #define __TIME_H__
  25.  
  26. #ifndef __STDDEF_H__
  27. #include <stddef.h>
  28. #endif
  29.  
  30. #define CLK_TCK 50  
  31.  
  32. struct tm {
  33.     int tm_sec;   /* seconds; range 0..59 */
  34.     int tm_min;   /* minutes; range 0..59 */
  35.     int tm_hour;  /* hours since midnight; range 0..23 */
  36.     int tm_mday;  /* day of month; range 1..31 */
  37.     int tm_mon;   /* month; range 0..11 */
  38.     int tm_year;  /* year; with 0==1900 */
  39.     int tm_wday;  /* day of week; range Sun=0..6 */
  40.     int tm_yday;  /* day of year; range 0..365 */
  41.     int tm_isdst; /* nonzero implies daylight savings */
  42. };
  43.  
  44. clock_t    clock(void);
  45. time_t     time(time_t *tp);
  46. double     difftime(time_t time2, time_t time1);
  47. time_t     mktime(struct tm *tp);
  48. char      *asctime(const struct tm *tp);
  49. char      *ctime(const time_t *tp);
  50. struct tm *gmtime(const time_t *tp);
  51. struct tm *localtime(const time_t *tp);
  52. #if 0
  53. size_t strftime(char *s, size_t max, const char *fmt, const struct tm *tp);
  54. #endif
  55.  
  56. /*
  57.  * extras
  58.  */
  59.  
  60. int     jday(time_t *t);
  61. int     dayofw(time_t *t);
  62.  
  63. #endif /* __TIME_H__ */
  64.  
  65.